﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MulticastTV
{
    /// <summary>
    /// Recording stop time form
    /// </summary>
    public partial class EnterStopTime : Form
    {
        DateTime stop;
        DateTime start;

        public EnterStopTime(DateTime start_)
        {
            InitializeComponent();
            start = start_;                
        }

        private void EnterStopTime_Load(object sender, EventArgs e)
        {
            dateTimePicker1.CustomFormat = "dd-MM-yyyy    HH:mm";
            dateTimePicker1.Value = start.AddHours(1);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            stop = dateTimePicker1.Value;
            this.Close();
        }

        public DateTime getStopDate
        {
            get { return stop; }
        }

        private void EnterStopTime_FormClosing(object sender, FormClosingEventArgs e)
        {
            stop = dateTimePicker1.Value;
        }
    }
}
